<extend name="Public/base"/>
<block name="nav">
    <include file="nav"/>
</block>
<block name="body">
    <form class="well form-inline " method="get" action="{:U('')}">

    <div class="form-group">


        <select class="input-large plus"  name="shop_id" >

            <option value="">请选择</option>

            <volist name=":F('Shop')" id="vo"  >

                <php>$clecked=($vo[id]==I('get.shop_id'))?'selected':'';</php>


                <option value="{$vo.id}" {$clecked}>{$vo.name}</option>

            </volist>
        </select>


        <input type="hidden" name="status" value="{$status}">


        下单时间:

        <input type="text" name="starttime" value="{:I('get.starttime')}" class="J_datetime input-sm" placeholder=""> -
        <input type="text" name="endtime" value="{:I('get.endtime')}" class="J_datetime input-sm" placeholder="">


        <input type="text" class="input-mini" name="phone" style="width:200px;" value="{$phone}" placeholder="手机号">
    </div>
    <div class="form-group">
        <button class="btn btn-xs btn-info" data-toggle="tooltip" title="搜索">
            <i class="icon-search bigger-110"></i>


        </button>

        <a data-toggle="tooltip" title="清除搜索项" href="{:U(index)}" class="tooltip-danger btn btn-xs btn-danger"><i
                class="icon-remove bigger-110"></i></a>
    </div>

    </form>

    <form class="J_ajaxForm" action="{:U('Peihuo/add')}" method="post">
        <div class="table_list">
            <table class="table table-striped table-bordered table-hover">
                <thead>
                <tr>
                    <th width="16"><label><input type="checkbox" class="check-all"></label></th>

                    <th>类型</th>
                    <th>订单编号</th>
                    <th>总价</th>
                    <th>提货站</th>
                    <th class="hidden-780">电话</th>
                    <th class="hidden-780">收件人</th>

                    <th>状态</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <volist name="list" id="vo">
                    <tr>
                        <td><input type="checkbox" class="ids" name="ids[]" value="{$vo.id}"></td>

                        <td>{$vo.modal|get_order_modal}</td>

                        <td>{$vo.order_sn}

                            <if condition="$vo['cui']">

                                <span class="badge badge-danger">催</span>

                            </if>

                        </td>
                        <td>{$vo.price_sum}</td>
                        <td>{$vo.shop_id|get_shop_name}</td>
                        <td>{$vo.tel}</td>


                        <td>{$vo.name}</td>


                        <td>{$vo.status|get_status_name}</td>

                        <td>

                            <a href="{:U('show',array('id'=>$vo['id']))}" data-trigger="modal" data-title="查看">查看</a>


                            <if condition="$vo[status] eq '2'"><a href="{:U('fahuo',array('id'=>$vo['id']))}">发货</a>
                            </if>

                            <!--<if condition="$vo[status] eq '3'"><a href="{:U('change',array("field"=>"status","value"=>"4",'id'=>$vo['id']))}" >送达</a></if>-->


                            <a class="ajax-del" href="{:U('delete',array('id'=>$vo['id']))}">删除</a>

                        </td>


                    </tr>

                </volist>
                </tbody>

            </table>
        </div>
        <div class="pagination">{$Page}</div>

        <if condition="$status eq '2'">
        <div class=" form-actions pt10 pb10 mb2 mt10">


            <button class="btn btn-primary btn-xs  " data-subcheck="1" url="{:U('Peihuo/add')}" target-form="J_ajaxForm"
                    type="submit">
                生成送货单
            </button>


        </div>
           </if>
    </form>
</block>
<block name="plugin-style">
    <link rel="stylesheet" href="__CSS__/chosen.css"/>
</block>

<block name="script">

</block>
